package com.zch.jh.service.dto;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

/**
 * A DTO for the {@link com.zch.jh.domain.Item} entity.
 */
public class ItemDTO implements Serializable {
    
    private Long id;

    private String itemName;

    private String itemCode;

    private String soruce;

    private String shortProfile;

    private String profile;

    private Set<ItemTypeDTO> itemTypes = new HashSet<>();
    
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getItemName() {
        return itemName;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName;
    }

    public String getItemCode() {
        return itemCode;
    }

    public void setItemCode(String itemCode) {
        this.itemCode = itemCode;
    }

    public String getSoruce() {
        return soruce;
    }

    public void setSoruce(String soruce) {
        this.soruce = soruce;
    }

    public String getShortProfile() {
        return shortProfile;
    }

    public void setShortProfile(String shortProfile) {
        this.shortProfile = shortProfile;
    }

    public String getProfile() {
        return profile;
    }

    public void setProfile(String profile) {
        this.profile = profile;
    }

    public Set<ItemTypeDTO> getItemTypes() {
        return itemTypes;
    }

    public void setItemTypes(Set<ItemTypeDTO> itemTypes) {
        this.itemTypes = itemTypes;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof ItemDTO)) {
            return false;
        }

        return id != null && id.equals(((ItemDTO) o).id);
    }

    @Override
    public int hashCode() {
        return 31;
    }

    // prettier-ignore
    @Override
    public String toString() {
        return "ItemDTO{" +
            "id=" + getId() +
            ", itemName='" + getItemName() + "'" +
            ", itemCode='" + getItemCode() + "'" +
            ", soruce='" + getSoruce() + "'" +
            ", shortProfile='" + getShortProfile() + "'" +
            ", profile='" + getProfile() + "'" +
            ", itemTypes='" + getItemTypes() + "'" +
            "}";
    }
}
